package jpavlich.cardsorter;

import java.io.File;
import java.io.FileFilter;

import javax.swing.ComboBoxModel;

public class CardsListModel extends FileListModel implements ComboBoxModel {

	Object selected;
	
	@Override
	public File getBaseFolder() {
		return new File("./tarjetas");
	}

	@Override
	protected FileFilter getFileFilter() {
		return new FileFilter() {
			
			@Override
			public boolean accept(File file) {
				return (file.getName().toUpperCase().endsWith(".PDF"));
			}
		};
	}

	@Override
	public void setSelectedItem(Object anItem) {
		selected = anItem;
		
	}

	@Override
	public Object getSelectedItem() {
		return selected;
	}

}
